//
//  HEBaseViewController.h
//  HealthElderly
//
//  Created by 吴欧 on 2020/10/20.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ZXNavigationBarController.h"

NS_ASSUME_NONNULL_BEGIN

@class HEEmptyDataModel;


typedef void(^VCBackBlockAction)(void);

typedef void(^HEBackBlockAction)(id);

@interface HEBaseViewController : ZXNavigationBarController

@property (nonatomic, assign) BOOL isFromHeadRefresh;
@property (nonatomic, assign) BOOL isFinishRefresh;
@property (nonatomic, copy) VCBackBlockAction backBlock;
@property (nonatomic, copy) HEBackBlockAction backParamBlock;

#pragma mark - VC出栈时调用
- (void)vcBackBlock:(VCBackBlockAction)block;
- (void)vcBackParamBlock:(HEBackBlockAction)block;

#pragma mark - 空数据 or 断网 提示View

@property(nonatomic, strong) HEEmptyDataModel *emptyConfig;

/// 空数据 or 断网提示
@property(nonatomic, strong) UITableView *gdTipsView;

/**
 添加刷新
 */
- (void)addRefresh;

- (void)setCustomTableView:(UITableView *)tableView;

/**
 显示空数据视图
 */
- (void)showEmpty;

/**
 隐藏空数据视图
*/
- (void)hideEmpty;

/**
 自定义空数据
*/
- (void)customEmptyModel:(HEEmptyDataModel *)model;

- (void)reloadRequestdata;

/**
 *  默认返回按钮的点击事件，默认是返回，子类可重写
 */
- (void)backBtnClicked;

/**
 是否隐藏导航栏
 */
@property (nonatomic, assign) BOOL isHidenNaviBar;

/// 当前页面是否正在显示
- (BOOL)isVCVisable;

@end





@interface HEEmptyDataModel : NSObject

/**
    展示图片，可不传
*/
@property (nonatomic, copy) NSString *tipsImageName;

/**
    提示标题
*/
@property (nonatomic, copy) NSString *tipsTitle;

/**
    显示副标题的时候，需要赋值副标题，否则不显示
 */
@property (nonatomic, copy) NSString *tipsDetailTitle;

/**
   按钮标题
*/
@property (nonatomic, copy) NSString *btnTitle;

/**
   按钮图片
*/
@property (nonatomic, copy) NSString *btnImgName;


/**
   是否显示空数据提示
*/
@property (nonatomic, assign) BOOL *isShowEmptyView;

@end

NS_ASSUME_NONNULL_END
